package cn.tedu.tmall.front.mall.service;

import cn.tedu.tmall.common.pojo.authentication.CurrentPrincipal;
import cn.tedu.tmall.front.mall.pojo.vo.CartListItemVO;
import cn.tedu.tmall.front.mall.pojo.vo.GoodsListItemVO;

import java.util.List;

public interface ICartService {
    //向购物车中添加商品
    void add(CurrentPrincipal principal,Long goodsId,Integer goodsNum);
    //删除购物车中的商品
    void deleteByUserIdGoodsID(CurrentPrincipal principal,Long goodsId);
    //增加购物车中商品的数量(+1)
    Integer increase(CurrentPrincipal principal,Long goodsId);
    //增加购物车中商品的数量(+num)
    Integer increase(CurrentPrincipal principal,Long goodsId,Integer num);
    //减少购物车中商品的数量(-1)
    Integer reduce(CurrentPrincipal principal,Long goodsId);
    //增加购物车中商品的数量(-num)
    Integer reduce(CurrentPrincipal principal,Long goodsId,Integer num);
    //查询购物车中的商品
    List<CartListItemVO> list(CurrentPrincipal principal);
}
